import { defineComponent, h } from 'vue'
import { Icon } from '@iconify/vue'

export default defineComponent({
  name: 'IconifyIcon',
  components: {
    Icon
  },
  props: {
    icon: {
      type: String,
      default: ''
    }
  },
  render() {
    const attrs = this.$attrs
    return h(
      Icon,
      {
        icon: `${this.icon}`,
        style: attrs.style
          ? Object.assign(attrs.style, { outline: 'none' })
          : { outline: 'none' },
        ...attrs,
        inline: true
      },
      {
        default: () => []
      }
    )
  }
})
